﻿CREATE TABLE [dbo].[HospBuilding] (
    [Id]          INT            IDENTITY (1, 1) NOT NULL,
    [HospId]      INT            NOT NULL,
    [Name]        NVARCHAR (50)  NULL,
    [Description] NVARCHAR (500) NULL,
    [AlphaCode]   NVARCHAR (50)  NULL,
    [ImageUrl]    NVARCHAR (500) NULL,
    [Sort]        INT            NULL,
    [RecStatus]   INT            NOT NULL,
    [RecCreateDt] DATETIME       NOT NULL,
    [RecUpdateDt] DATETIME       NULL,
    [RecDeleteDt] DATETIME       NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'医院建筑表', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'主键，自增长', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding', @level2type = N'COLUMN', @level2name = N'Id';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'所属医院Id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding', @level2type = N'COLUMN', @level2name = N'HospId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'建筑名称', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding', @level2type = N'COLUMN', @level2name = N'Name';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'建筑描述', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding', @level2type = N'COLUMN', @level2name = N'Description';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'字母代码', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding', @level2type = N'COLUMN', @level2name = N'AlphaCode';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'建筑图片Url地址', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding', @level2type = N'COLUMN', @level2name = N'ImageUrl';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'排序', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding', @level2type = N'COLUMN', @level2name = N'Sort';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录状态, 1：正常；2：删除', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding', @level2type = N'COLUMN', @level2name = N'RecStatus';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录创建时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding', @level2type = N'COLUMN', @level2name = N'RecCreateDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录上次修改时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding', @level2type = N'COLUMN', @level2name = N'RecUpdateDt';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'记录删除时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'HospBuilding', @level2type = N'COLUMN', @level2name = N'RecDeleteDt';

